<extend name="Index/index" />

<block name="main">
<div class=" banner-buying">
	<div class=" container">
		<h3><span>房源信息</span></h3>
		<div class="clearfix"> </div>
	</div>
</div>

<div class="container">
	<div class="buy-single-single">
		<div class="col-md-9 single-box">
			<div class=" buying-top">
				<div class="flexslider">
					<ul class="slides">
					    <li data-thumb="images/ss.jpg">
					        <img src="__PUBLIC__/Uploads/<{$file[0]}>" />
					    </li>
					</ul>
				</div>

				<script defer src="js/jquery.flexslider.js"></script>
				<link rel="stylesheet" href="css/flexslider.css" type="text/css" media="screen" />
				<script>
					// 也可用 $(document).ready()
					$(window).load(function() {
					  $('.flexslider').flexslider({
					    animation: "slide",
					    controlNav: "thumbnails"
					  });
					});
				</script>
			</div>

			<div class="buy-sin-single">
				<div class="col-sm-5 middle-side immediate">
					<form action="<{:U('Orders/index')}>" method="post">
						<h4>即刻拥有</h4>
						<p><span class="bath3">类型 :</span><span class="two"><{$info['type']}></span></p>
						<p><span class="bath3">软床 :</span><span class="two"><{$info['beds']}>/张</span></p>
						<p><span class="bath3">厕所 :</span><span class="two"><{$info['toilets']}>/间</span></p>
						<p><span class="bath4">地址 :</span><span class="two"><{$info['field']}></span></p>
						<p><span class="bath3">租期 :</span><span class="two"><{$info['months']}>月</span></p>
						<p><span class="bath3">价格 :</span><span class="two"><{$info['price']}>元</span></p>
						<div class="right-side">
							<a href="<{:U('Like/doadd',array('uid'=>$_SESSION['user']['id'],'gid'=>$id))}>">
								<i class="icon-book"></i>点赞 <{$d[0]['like']}>
							</a>
							<a href="<{:U('Like/step',array('uid'=>$_SESSION['user']['id'],'gid'=>$id))}>">
								<i class="icon-book"></i>踩<{$d[0]['bad']}>
							</a>
							<a href="<{:U('Collect/doadd',array('uid'=>$_SESSION['user']['id'],'gid'=>$id))}>">
								<i class="icon-book"></i>收藏
							</a>
						</div>
						<input type="hidden" name="gid" value="<{$id}>">
						<input type="hidden" name="uid" value="<{$_SESSION['user']['id']}>">
						<input type="hidden" name="photo" value="<{$file[0]}>">
						<input type="hidden" name="amount" value="<{$info['price']}>">
						<input type="hidden" name="persons" value="1">	
						<input type="hidden" name="address" value="<{$info['field']}>">
						<input type="hidden" name="phone" value="<{$_SESSION['user']['tel']}>">
						<input type="hidden" name="nickname" value="<{$_SESSION['user']['nickname']}>">

						<div class="right-side">
							<input type="submit" class="hvr-sweep-to-right more"  value="立即下单">
						</div>
					</form>
				</div>
				<div class="col-sm-7 buy-sin">
				 	<h4>房屋描述</h4>
				 	<p><{$info['desc']}></p>
				</div>
				<div class="clearfix"> </div>
			</div>

			<div class="map-buy-single">
			 	<h4>地图位置</h4>  <h5><{$info['field']}></h5>
				 <div class="col-md-6" id="allmap" style="height:400px;"></div>
			</div>

			<div class="video-pre">
				<h4>评论</h4>
				<volist name="c" id="v">
					<div>
						<div class="t">
							用户:<{$v['nickname']}>
						</div>
						<div class="content">
							<{$v['desc']}>
						</div>
						<div class="elinfo">
							<span class="floor-date"><{$v['createtime']}></span>
						</div>
					</div>
				</volist>
			</div>
		</div> <!-- END single-box -->
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=B8cfd1501ae7f7c55dc3793ee989c354"></script>
		<!-- 百度地图API功能 -->
		<script type="text/javascript">
			var map = new BMap.Map("allmap");
			var point = new BMap.Point(116.331398,39.897445);
			map.centerAndZoom(point,12);
			// 创建地址解析器实例
			var myGeo = new BMap.Geocoder();
			// 将地址解析结果显示在地图上,并调整地图视野
			map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
			myGeo.getPoint("<{$info['field']}>", function(point){
				if (point) {
					map.centerAndZoom(point, 16);
					map.addOverlay(new BMap.Marker(point));
				}else{
					alert("您选择地址没有解析到结果!");
				}
			}, "北京市");
		</script>

		<div class="col-md-3">
			<div class="single-box-right right-immediate">
		     	<h4>Featured Communities</h4>
				<div class="single-box-img ">
					<div class="box-img">
						<a href="<{:U('Display/index',array('id'=>5))}>">
							<img class="img-responsive" src="__PUBLIC__/Uploads/<{$files[0]}>">
						</a>
					</div>
					<div class="box-text">
						<p><a href="single.html">Lorem ipsum dolor sit amet</a></p>
						<a href="single.html" class="in-box">More Info</a>
					</div>
					<div class="clearfix"> </div>
				</div>

				<div class="single-box-img">
					<div class="box-img">
						<a href="<{:U('Display/index',array('id'=>6))}>">
							<img class="img-responsive" src="__PUBLIC__/Uploads/<{$files[1]}>">
						</a>
					</div>
					<div class="box-text">
						<p><a href="single.html">Lorem ipsum dolor sit amet</a></p>
						<a href="single.html" class="in-box">More Info</a>
					</div>
					<div class="clearfix"> </div>
				</div>

				<div class="single-box-img">
					<div class="box-img">
						<a href="<{:U('Display/index',array('id'=>1))}>">
							<img class="img-responsive" src="__PUBLIC__/Uploads/<{$files[2]}>">
						</a>
					</div>
					<div class="box-text">
						<p><a href="single.html">Lorem ipsum dolor sit amet</a></p>
						<a href="single.html" class="in-box">More Info</a>
					</div>
					<div class="clearfix"> </div>
				</div>

				<div class="single-box-img">
					<div class="box-img">
						<a href="<{:U('Display/index',array('id'=>7))}>">
							<img class="img-responsive" src="__PUBLIC__/Uploads/<{$files[3]}>">
						</a>
					</div>
					<div class="box-text">
						<p><a href="single.html">Lorem ipsum dolor sit amet</a></p>
						<a href="single.html" class="in-box">More Info</a>
					</div>
					<div class="clearfix"> </div>
				</div>
		 	</div>

	    </div>
		<div class="clearfix"> </div>
	</div>
</div><!--END container-->

</block>